package clase;


import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author snake_gt
 */
public class Cliente {

    public static void main(String[] args) {
        try {
            Socket socket = new Socket("localhost", 9999);
            DataInputStream entrada = new DataInputStream(socket.getInputStream());
            DataOutputStream salida = new DataOutputStream(socket.getOutputStream());
            Scanner sc= new Scanner(System.in);
            salida.writeUTF(sc.next());
            salida.writeUTF(sc.next());
            salida.writeUTF(sc.next());
            System.out.println("el servidor dice " + entrada.readUTF());
        } catch (Exception e) {
            System.out.println("No se puede conectar con el server");
        }
    }
}
